From 222d6f1db181e97e96354a0e2312587934fec16f Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sat, 6 Nov 2021 03:15:04 +0100 Subject: [PATCH] label: Don't deduce label width from logical rect The width of a logical rect after line breaking is sometimes not wide enough to cause line breaking to break at the exact same points. (Is that by design or a bug in Pango? I don't know.) So don't use the width, and only relyon values we actually set to pango_layout_set_width(). --- gtk/gtklabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtklabel.c b/gtk/gtklabel.c index 3580deae1e..3c3be85406 100644 --- a/gtk/gtklabel.c +++ b/gtk/gtklabel.c @@ -1203,7 +1203,7 @@ get_width_for_height (GtkLabel *self, if (text_height > height) min = mid + 1; else - max = text_width; + max = mid; } *minimum_width = min; -- 2.30.2